<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@ include file="../../attr.jsp" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!doctype html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=emulateIE7"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta charset="utf-8">
    <link rel="stylesheet" href="${ctx}/css/sapar.css"/>
    <link rel="stylesheet" type="text/css" href="${ctx}/css/common.css"/>

    <script type="text/javascript" src="${ctx}/js/jquery.js"></script>
    <script type="text/javascript" src="${ctx}/js/sapar.js"></script>
    <script type="text/javascript" src="${ctx}/js/WdatePicker.js"></script>
    <script type="text/javascript" src="${ctx}/assets/layer/layer.js"></script>
    <script type="text/javascript" src="${ctx}/js/kkpager.min.js"></script>
    <script type="text/javascript" src="${ctx}/js/jquery.PrintArea.js"></script>
    <link rel="stylesheet" type="text/css" href="${ctx}/css/kkpager_blue.css"/>
    <script type="text/javascript" src="${ctx}/js/LodopFuncs.js"></script>
    <object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
        <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0></embed>
    </object>

    <style>
        ul {
            padding-left: 0;
        }

        ul, li {
            list-style: none;
            font-size: 8px;
            margin-left: 4px;
            margin-top: 1px;
        }

        .tiaoma {
            width: 256px;
            height: 142px;
            border: 1px solid #000;
        }

        .item {
            height: 36px;
            border-bottom: 1px solid #000;
            display: flex;
        }

        .item h1 {
            font-size: 16px;
            font-weight: normal;
            margin-left: 5px;
            line-height: 15px;
        }

        .item p {
            line-height: 12px;
            margin-left: 42px;
            font-size: 11px;
        }

        .item2 {
            height: 38px;
            border-bottom: 1px solid #000;
            display: flex;
            font-size: 11px;
        }

        .item2 ul:nth-of-type(2) {
            margin-left: 39px;
        }

        .tiaop {
            display: flex;
            height: 35px;
            border-bottom: 1px solid #000;
            line-height: 36px;
            margin: 0;
            padding-left: 5px;
            font-size: 9px;
        }
    </style>


    <title>编辑包装</title>
</head>

<body>
<div id="saper-container">

    <div class="tiaoma" id="saper-print">
        <div class="item">
            <h1>${baoName } <span></span></h1>
            <p>${depName }</p>
        </div>
        <div class="item2">
            <ul>
                <li>灭菌日期：${miejuntime }</li>
                <li>失效日期：${guoqitime }(${days }天)</li>
            </ul>
            <ul>
                <li>配包人：${peibaoren} </li>
                <li>审核人：</li>
                <li>关包人：</li>
            </ul>
        </div>
        <p class="tiaop">
            条码：<img
                src="${ctx}/createBarCode.do?barType=CODE39&checkCharacter=n&checkCharacterInText=1111111&barHeightCM=0.75&st=y&textFont=宋体|BOLD|14&fontColor=BLACK&barColor=BLACK&code=${baoTiaoma }"/>
        </p>
        <p class="tiaop" style="border-bottom:0">
            条码：<img
                src="${ctx}/createBarCode.do?barType=CODE39&checkCharacter=n&checkCharacterInText=1111111&barHeightCM=0.75&st=y&textFont=宋体|BOLD|14&fontColor=BLACK&barColor=BLACK&code=${baoTiaoma }"/>
        </p>
    </div>


</div>

<div id="saper-ft">
    <input type="button" value="打印" id="print" onclick="javascript:myPreview();"/>
</div>
</body>

<script language="javascript" type="text/javascript">

    var LODOP; //声明为全局变量
    function myPrint() {
        CreatePrintPage();
        LODOP.PRINT();
    };
    function myPrintA() {
        CreatePrintPage();
        LODOP.PRINTA();
    };
    function myPreview() {
        CreatePrintPage();
        LODOP.PREVIEW();
    };
    function mySetup() {
        CreatePrintPage();
        LODOP.PRINT_SETUP();
    };
    function myDesign() {
        CreatePrintPage();
        LODOP.PRINT_DESIGN();
    };
    function myBlankDesign() {
        LODOP = getLodop();
        LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_空白练习");
        LODOP.PRINT_DESIGN();
    };

    function CreatePrintPage() {
        var packList =
        ${packImfor}
        var miejuntime = packList[6];
        var baoName = packList[3];
        var depName = packList[2];
        var guoqitime = packList[7];
        var days = packList[8];
        var baoTiaoma = packList[4];
        var queshi = packList[0];
        var peibaoren = packList[1];
        LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
        LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_名片");
        LODOP.ADD_PRINT_RECT(10, 10, 256, 142, 0, 1);
        LODOP.SET_PRINT_STYLE("FontSize", 8);
        LODOP.SET_PRINT_STYLE("FontName", "微软雅黑");
        LODOP.ADD_PRINT_TEXT(10, 10, 170, 38, baoName);
        LODOP.ADD_PRINT_TEXT(16, 160, 80, 38, depName);
        LODOP.ADD_PRINT_RECT(38, 10, 256, 116, 0, 1);
        LODOP.ADD_PRINT_RECT(85, 10, 256, 116, 0, 1);
        LODOP.ADD_PRINT_TEXT(40, 10, 150, 38, "灭菌日期：" + miejuntime);
        LODOP.ADD_PRINT_TEXT(70, 10, 150, 38, "失效日期：" + guoqitime + "(" + days + ")天");
        LODOP.ADD_PRINT_TEXT(40, 160, 150, 19, "配包人：" + peibaoren);
        LODOP.ADD_PRINT_TEXT(55, 160, 150, 19, "审核人：");
        LODOP.ADD_PRINT_TEXT(70, 160, 150, 19, "打包人：");
        LODOP.SET_PRINT_STYLEA(2, "FontName", "隶书");
        LODOP.SET_PRINT_STYLEA(2, "FontSize", 14);
        LODOP.SET_PRINT_STYLEA(3, "FontSize", 11);
        LODOP.ADD_PRINT_TEXT(98, 10, 150, 19, "条码");
        LODOP.ADD_PRINT_BARCODE(90, 50, 200, 25, "Code39", baoTiaoma);
        LODOP.SET_PRINT_STYLEA(0, "ShowBarText", 0);
        LODOP.ADD_PRINT_TEXT(125, 10, 150, 19, "条码");
        LODOP.ADD_PRINT_BARCODE(120, 50, 200, 30, "Code39", baoTiaoma);
        LODOP.SET_PRINT_STYLEA(0, "ShowBarText", 0);

    };
    function myAddHtml() {
        LODOP = getLodop();
        LODOP.PRINT_INIT("");
        LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", document.getElementById("textarea01").value);
    };
</script>


<!-- <script type="text/javascript">


var LODOP;
$(function(){
	
	$("#print1").click(function(){
		$("div#saper-print").printArea();
	})
	
	
	$("#print").click(function(){
		LODOP=getLodop(document.getElementById('LODOP_OB'),document.getElementById('LODOP_EM')); 
   		LODOP.PRINT_INIT("");		            
		LODOP.ADD_PRINT_HTM(0,0,70,40,document.getElementById("dd").value);
		LODOP.PRINT();
		
	});
	
	
})

	

</script> -->


</html>